-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vmware_vm_info: Add allocated Storage, CPU and Memory to output #1283
vmware_vm_info: Add allocated Storage, CPU and Memory to output #1283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR: Found 2 pep8 issue(s) which need to be resolved:
plugins/modules/vmware_vm_info.py
Outdated
PyVmomi, get_all_objs, | ||
vmware_argument_spec, _get_vm_prop, | ||
get_parent_datacenter, find_vm_by_name) | ||
from ansible_collections.community.vmware.plugins.module_utils.vmware import PyVmomi, get_all_objs, vmware_argument_spec, _get_vm_prop, get_parent_datacenter, find_vm_by_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR: plugins/modules/vmware_vm_info.py:246:161: E501: line too long (174 > 160 characters)
plugins/modules/vmware_vm_info.py
Outdated
"storage": storage_allocated, | ||
"cpu": vm.config.hardware.numCPU, | ||
"memory": vm.config.hardware.memoryMB | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR: plugins/modules/vmware_vm_info.py:340:17: E123: closing bracket does not match indentation of opening bracket's line
plugins/modules/vmware_vm_info.py
Outdated
if isinstance(device, vim.vm.device.VirtualDisk): | ||
storage_allocated += device.capacityInBytes | ||
|
||
allocated = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a flag to return these facts optionally (for example - show_allocated
) rather than always returning facts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I will do this.
Add a posibility to show or not to show the allocation.
recheck |
recheck |
recheck |
recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Build succeeded (gate pipeline). ✔️ ansible-tox-linters SUCCESS in 3m 52s |
SUMMARY
Add allocated Storage, CPU and Memory to output
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
vmware_vm_info.py
ADDITIONAL INFORMATION